﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en" />

<link href="jquery.zrssfeed.css" rel="stylesheet" type="text/css" />

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>

<title>zRSSFeed - Redirecting RSS feed links to another page (Part 2)</title>

<script type="text/javascript">
$(document).ready(function () {

	var url = getParameter('link');

	$('#test').attr('src',url);

	function getParameter(paramName) {

		var searchString = window.location.search.substring(1),i, val, params = searchString.split("&");

		for (i=0;i<params.length;i++) {
			val = params[i].split("=");
			if (val[0] == paramName) {
				return unescape(val[1]);
			}
		}
	  	return null;
	}

});
</script>

<style>
#test {
	width: 100%;
	height: 600px;
}
</style>

</head>
<body>

<h1>zRSSFeed - Redirecting RSS feed links to another page (Part 2)</h1>
<p>This is the result of the redirected link example showing the original article of the feed item that was clicked.</p>

<h4>Script</h4>
<pre>
$(document).ready(function () {

	$('#test').attr('src',getParameter('link'));

	function getParameter(paramName) {

		var searchString = window.location.search.substring(1),i, val, params = searchString.split("&");

		for (i=0;i&lt;params.length;i++) {
			val = params[i].split("=");
			if (val[0] == paramName) {
				return unescape(val[1]);
			}
		}
	  	return null;
	}
});
</pre>

<h4>Result</h4>
<iframe id="test"></iframe>

</body>
</html>